home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / configure < prev    next >
Encoding:
Text File  |  1995-03-24  |  56.7 KB  |  2,207 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.2 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14.  
  15. # Initialize some variables set by options.
  16. # The variables have the same names as the options, with
  17. # dashes changed to underlines.
  18. build=NONE
  19. cache_file=./config.cache
  20. exec_prefix=NONE
  21. host=NONE
  22. no_create=
  23. nonopt=NONE
  24. no_recursion=
  25. prefix=NONE
  26. program_prefix=NONE
  27. program_suffix=NONE
  28. program_transform_name=s,x,x,
  29. silent=
  30. site=
  31. srcdir=
  32. target=NONE
  33. verbose=
  34. x_includes=NONE
  35. x_libraries=NONE
  36.  
  37. # Initialize some other variables.
  38. subdirs=
  39.  
  40. ac_prev=
  41. for ac_option
  42. do
  43.  
  44.   # If the previous option needs an argument, assign it.
  45.   if test -n "$ac_prev"; then
  46.     eval "$ac_prev=\$ac_option"
  47.     ac_prev=
  48.     continue
  49.   fi
  50.  
  51.   case "$ac_option" in
  52.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  53.   *) ac_optarg= ;;
  54.   esac
  55.  
  56.   # Accept the important Cygnus configure options, so we can diagnose typos.
  57.  
  58.   case "$ac_option" in
  59.  
  60.   -build | --build | --buil | --bui | --bu | --b)
  61.     ac_prev=build ;;
  62.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  63.     build="$ac_optarg" ;;
  64.  
  65.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  66.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  67.     ac_prev=cache_file ;;
  68.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  69.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  70.     cache_file="$ac_optarg" ;;
  71.  
  72.   -disable-* | --disable-*)
  73.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  74.     # Reject names that are not valid shell variable names.
  75.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  76.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  77.     fi
  78.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  79.     eval "enable_${ac_feature}=no" ;;
  80.  
  81.   -enable-* | --enable-*)
  82.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  83.     # Reject names that are not valid shell variable names.
  84.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  85.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  86.     fi
  87.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  88.     case "$ac_option" in
  89.       *=*) ;;
  90.       *) ac_optarg=yes ;;
  91.     esac
  92.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  93.  
  94.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  95.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  96.   | --exec | --exe | --ex)
  97.     ac_prev=exec_prefix ;;
  98.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  99.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  100.   | --exec=* | --exe=* | --ex=*)
  101.     exec_prefix="$ac_optarg" ;;
  102.  
  103.   -gas | --gas | --ga | --g)
  104.     # Obsolete; use --with-gas.
  105.     with_gas=yes ;;
  106.  
  107.   -help | --help | --hel | --he)
  108.     # Omit some internal or obsolete options to make the list less imposing.
  109.     # This message is too long to be a string in the A/UX 3.1 sh.
  110.     cat << EOF
  111. Usage: configure [options] [host]
  112. Options: [defaults in brackets after descriptions]
  113. Configuration:
  114.   --cache-file=FILE       cache test results in FILE
  115.   --help                  print this message
  116.   --no-create             do not create output files
  117.   --quiet, --silent       do not print \`checking...' messages
  118.   --version               print the version of autoconf that created configure
  119. Directory and file names:
  120.   --prefix=PREFIX         install architecture-independent files in PREFIX
  121.                           [$ac_default_prefix]
  122.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  123.                           [same as prefix]
  124.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  125.   --program-prefix=PREFIX prepend PREFIX to installed program names
  126.   --program-suffix=SUFFIX append SUFFIX to installed program names
  127.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  128. Host type:
  129.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  130.   --host=HOST             configure for HOST [guessed]
  131.   --target=TARGET         configure for TARGET [TARGET=HOST]
  132. Features and packages:
  133.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  134.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  135.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  136.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  137.   --x-includes=DIR        X include files are in DIR
  138.   --x-libraries=DIR       X library files are in DIR
  139. --enable and --with options recognized:$ac_help
  140. EOF
  141.     exit 0 ;;
  142.  
  143.   -host | --host | --hos | --ho)
  144.     ac_prev=host ;;
  145.   -host=* | --host=* | --hos=* | --ho=*)
  146.     host="$ac_optarg" ;;
  147.  
  148.   -nfp | --nfp | --nf)
  149.     # Obsolete; use --without-fp.
  150.     with_fp=no ;;
  151.  
  152.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  153.   | --no-cr | --no-c)
  154.     no_create=yes ;;
  155.  
  156.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  157.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  158.     no_recursion=yes ;;
  159.  
  160.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  161.     ac_prev=prefix ;;
  162.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  163.     prefix="$ac_optarg" ;;
  164.  
  165.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  166.   | --program-pre | --program-pr | --program-p)
  167.     ac_prev=program_prefix ;;
  168.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  169.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  170.     program_prefix="$ac_optarg" ;;
  171.  
  172.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  173.   | --program-suf | --program-su | --program-s)
  174.     ac_prev=program_suffix ;;
  175.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  176.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  177.     program_suffix="$ac_optarg" ;;
  178.  
  179.   -program-transform-name | --program-transform-name \
  180.   | --program-transform-nam | --program-transform-na \
  181.   | --program-transform-n | --program-transform- \
  182.   | --program-transform | --program-transfor \
  183.   | --program-transfo | --program-transf \
  184.   | --program-trans | --program-tran \
  185.   | --progr-tra | --program-tr | --program-t)
  186.     ac_prev=program_transform_name ;;
  187.   -program-transform-name=* | --program-transform-name=* \
  188.   | --program-transform-nam=* | --program-transform-na=* \
  189.   | --program-transform-n=* | --program-transform-=* \
  190.   | --program-transform=* | --program-transfor=* \
  191.   | --program-transfo=* | --program-transf=* \
  192.   | --program-trans=* | --program-tran=* \
  193.   | --progr-tra=* | --program-tr=* | --program-t=*)
  194.     program_transform_name="$ac_optarg" ;;
  195.  
  196.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  197.   | -silent | --silent | --silen | --sile | --sil)
  198.     silent=yes ;;
  199.  
  200.   -site | --site | --sit)
  201.     ac_prev=site ;;
  202.   -site=* | --site=* | --sit=*)
  203.     site="$ac_optarg" ;;
  204.  
  205.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  206.     ac_prev=srcdir ;;
  207.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  208.     srcdir="$ac_optarg" ;;
  209.  
  210.   -target | --target | --targe | --targ | --tar | --ta | --t)
  211.     ac_prev=target ;;
  212.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  213.     target="$ac_optarg" ;;
  214.  
  215.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  216.     verbose=yes ;;
  217.  
  218.   -version | --version | --versio | --versi | --vers)
  219.     echo "configure generated by autoconf version 2.2"
  220.     exit 0 ;;
  221.  
  222.   -with-* | --with-*)
  223.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  224.     # Reject names that are not valid shell variable names.
  225.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  226.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  227.     fi
  228.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  229.     case "$ac_option" in
  230.       *=*) ;;
  231.       *) ac_optarg=yes ;;
  232.     esac
  233.     eval "with_${ac_package}='$ac_optarg'" ;;
  234.  
  235.   -without-* | --without-*)
  236.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  237.     # Reject names that are not valid shell variable names.
  238.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  239.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  240.     fi
  241.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  242.     eval "with_${ac_package}=no" ;;
  243.  
  244.   --x)
  245.     # Obsolete; use --with-x.
  246.     with_x=yes ;;
  247.  
  248.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  249.   | --x-incl | --x-inc | --x-in | --x-i)
  250.     ac_prev=x_includes ;;
  251.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  252.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  253.     x_includes="$ac_optarg" ;;
  254.  
  255.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  256.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  257.     ac_prev=x_libraries ;;
  258.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  259.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  260.     x_libraries="$ac_optarg" ;;
  261.  
  262.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  263.     ;;
  264.  
  265.   *) 
  266.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  267.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  268.     fi
  269.     if test "x$nonopt" != xNONE; then
  270.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  271.     fi
  272.     nonopt="$ac_option"
  273.     ;;
  274.  
  275.   esac
  276. done
  277.  
  278. if test -n "$ac_prev"; then
  279.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  280. fi
  281.  
  282. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  283.  
  284. # File descriptor usage:
  285. # 0 standard input
  286. # 1 file creation
  287. # 2 errors and warnings
  288. # 3 some systems may open it to /dev/tty
  289. # 4 used on the Kubota Titan
  290. # 6 checking for... messages and results
  291. # 5 compiler messages saved in config.log
  292. if test "$silent" = yes; then
  293.   exec 6>/dev/null
  294. else
  295.   exec 6>&1
  296. fi
  297. exec 5>./config.log
  298.  
  299. echo "\
  300. This file contains any messages produced by compilers while
  301. running configure, to aid debugging if configure makes a mistake.
  302. " 1>&5
  303.  
  304. # Strip out --no-create and --no-recursion so they do not pile up.
  305. # Also quote any args containing shell metacharacters.
  306. ac_configure_args=
  307. for ac_arg
  308. do
  309.   case "$ac_arg" in
  310.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  311.   | --no-cr | --no-c) ;;
  312.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  313.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  314.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  315.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  316.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  317.   esac
  318. done
  319.  
  320. # NLS nuisances.
  321. # Only set LANG and LC_ALL to C if already set.
  322. # These must not be set unconditionally because not all systems understand
  323. # e.g. LANG=C (notably SCO).
  324. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  325. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  326.  
  327. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  328. rm -rf conftest* confdefs.h
  329. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  330. echo > confdefs.h
  331.  
  332. # A filename unique to this package, relative to the directory that
  333. # configure is in, which we can look for to find out if srcdir is correct.
  334. ac_unique_file=tcl.h
  335.  
  336. # Find the source files, if location was not specified.
  337. if test -z "$srcdir"; then
  338.   ac_srcdir_defaulted=yes
  339.   # Try the directory containing this script, then its parent.
  340.   ac_prog=$0
  341.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  342.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  343.   srcdir=$ac_confdir
  344.   if test ! -r $srcdir/$ac_unique_file; then
  345.     srcdir=..
  346.   fi
  347. else
  348.   ac_srcdir_defaulted=no
  349. fi
  350. if test ! -r $srcdir/$ac_unique_file; then
  351.   if test "$ac_srcdir_defaulted" = yes; then
  352.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  353.   else
  354.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  355.   fi
  356. fi
  357. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  358.  
  359. # Prefer explicitly selected file to automatically selected ones.
  360. if test -z "$CONFIG_SITE"; then
  361.   if test "x$prefix" != xNONE; then
  362.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  363.   else
  364.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  365.   fi
  366. fi
  367. for ac_site_file in $CONFIG_SITE; do
  368.   if test -r "$ac_site_file"; then
  369.     echo "loading site script $ac_site_file"
  370.     . "$ac_site_file"
  371.   fi
  372. done
  373.  
  374. if test -r "$cache_file"; then
  375.   echo "loading cache $cache_file"
  376.   . $cache_file
  377. else
  378.   echo "creating cache $cache_file"
  379.   > $cache_file
  380. fi
  381.  
  382. ac_ext=c
  383. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  384. ac_cpp='$CPP $CPPFLAGS'
  385. ac_compile='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS -c 1>&5 2>&5'
  386. ac_link='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS $LDFLAGS -o conftest $LIBS 1>&5 2>&5'
  387.  
  388. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  389.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  390.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  391.     ac_n= ac_c='
  392. ' ac_t='    '
  393.   else
  394.     ac_n=-n ac_c= ac_t=
  395.   fi
  396. else
  397.   ac_n= ac_c='\c' ac_t=
  398. fi
  399.  
  400.  
  401. # @(#) configure.in 1.6 95/03/24 09:38:10
  402.  
  403. ac_aux_dir=
  404. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  405.   if test -f $ac_dir/install-sh; then
  406.     ac_aux_dir=$ac_dir
  407.     ac_install_sh="$ac_aux_dir/install-sh -c"
  408.     break
  409.   elif test -f $ac_dir/install.sh; then
  410.     ac_aux_dir=$ac_dir
  411.     ac_install_sh="$ac_aux_dir/install.sh -c"
  412.     break
  413.   fi
  414. done
  415. if test -z "$ac_aux_dir"; then
  416.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  417. fi
  418. ac_config_guess=$ac_aux_dir/config.guess
  419. ac_config_sub=$ac_aux_dir/config.sub
  420. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  421.  
  422. # Find a good install program.  We prefer a C program (faster),
  423. # so one script is as good as another.  But avoid the broken or
  424. # incompatible versions:
  425. # SysV /etc/install, /usr/sbin/install
  426. # SunOS /usr/etc/install
  427. # IRIX /sbin/install
  428. # AIX /bin/install
  429. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  430. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  431. # ./install, which can be erroneously created by make from ./install.sh.
  432. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  433. if test -z "$INSTALL"; then
  434. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  435.   echo $ac_n "(cached) $ac_c" 1>&6
  436. else
  437.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  438.   for ac_dir in $PATH; do
  439.     # Account for people who put trailing slashes in PATH elements.
  440.     case "$ac_dir/" in
  441.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  442.     *)
  443.       # OSF1 and SCO ODT 3.0 have their own names for install.
  444.       for ac_prog in ginstall installbsd scoinst install; do
  445.         if test -f $ac_dir/$ac_prog; then
  446.       if test $ac_prog = install &&
  447.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  448.         # AIX install.  It has an incompatible calling convention.
  449.         # OSF/1 installbsd also uses dspmsg, but is usable.
  450.         :
  451.       else
  452.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  453.         break 2
  454.       fi
  455.     fi
  456.       done
  457.       ;;
  458.     esac
  459.   done
  460.   IFS="$ac_save_ifs"
  461.   # As a last resort, use the slow shell script.
  462.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  463. fi
  464.   INSTALL="$ac_cv_path_install"
  465. fi
  466. echo "$ac_t""$INSTALL" 1>&6
  467.  
  468. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  469. # It thinks the first close brace ends the variable substitution.
  470. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  471.  
  472. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  473.  
  474. # Extract the first word of "ranlib", so it can be a program name with args.
  475. set dummy ranlib; ac_word=$2
  476. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  477. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  478.   echo $ac_n "(cached) $ac_c" 1>&6
  479. else
  480.   if test -n "$RANLIB"; then
  481.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  482. else
  483.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  484.   for ac_dir in $PATH; do
  485.     test -z "$ac_dir" && ac_dir=.
  486.     if test -f $ac_dir/$ac_word; then
  487.       ac_cv_prog_RANLIB="ranlib"
  488.       break
  489.     fi
  490.   done
  491.   IFS="$ac_save_ifs"
  492.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  493. fi
  494. fi
  495. RANLIB="$ac_cv_prog_RANLIB"
  496. if test -n "$RANLIB"; then
  497.   echo "$ac_t""$RANLIB" 1>&6
  498. else
  499.   echo "$ac_t""no" 1>&6
  500. fi
  501.  
  502. if test "x$prefix" = xNONE; then
  503. echo $ac_n "checking for prefix by ""... $ac_c" 1>&6
  504. # Extract the first word of "tclsh", so it can be a program name with args.
  505. set dummy tclsh; ac_word=$2
  506. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  507. if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
  508.   echo $ac_n "(cached) $ac_c" 1>&6
  509. else
  510.   case "$TCLSH" in
  511.   /*)
  512.   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
  513.   ;;
  514.   *)
  515.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  516.   for ac_dir in $PATH; do
  517.     test -z "$ac_dir" && ac_dir=.
  518.     if test -f $ac_dir/$ac_word; then
  519.       ac_cv_path_TCLSH="$ac_dir/$ac_word"
  520.       break
  521.     fi
  522.   done
  523.   IFS="$ac_save_ifs"
  524.   ;;
  525. esac
  526. fi
  527. TCLSH="$ac_cv_path_TCLSH"
  528. if test -n "$TCLSH"; then
  529.   echo "$ac_t""$TCLSH" 1>&6
  530. else
  531.   echo "$ac_t""no" 1>&6
  532. fi
  533.  
  534.   if test -n "$ac_cv_path_TCLSH"; then
  535.     prefix=`echo $ac_cv_path_TCLSH|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
  536.   fi
  537. fi
  538.  
  539. # If we cannot run a trivial program, we must be cross compiling.
  540. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  541. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  542.   echo $ac_n "(cached) $ac_c" 1>&6
  543. else
  544.   if test "$cross_compiling" = yes; then
  545.   ac_cv_c_cross=yes
  546. else
  547. cat > conftest.$ac_ext <<EOF
  548. #line 549 "configure"
  549. #include "confdefs.h"
  550. main(){return(0);}
  551. EOF
  552. eval $ac_link
  553. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  554.   ac_cv_c_cross=no
  555. else
  556.   ac_cv_c_cross=yes
  557. fi
  558. fi
  559. rm -fr conftest*
  560. fi
  561. cross_compiling=$ac_cv_c_cross
  562. echo "$ac_t""$ac_cv_c_cross" 1>&6
  563.  
  564. CC=${CC-cc}
  565.  
  566.  
  567. #--------------------------------------------------------------------
  568. #    Supply substitutes for missing POSIX library procedures, or
  569. #    set flags so Tcl uses alternate procedures.
  570. #--------------------------------------------------------------------
  571.  
  572. for ac_func in getcwd opendir strerror strncasecmp strstr
  573. do
  574. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  575. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  576.   echo $ac_n "(cached) $ac_c" 1>&6
  577. else
  578.   cat > conftest.$ac_ext <<EOF
  579. #line 580 "configure"
  580. #include "confdefs.h"
  581. /* System header to define __stub macros and hopefully few prototypes,
  582.     which can conflict with char $ac_func(); below.  */
  583. #include <assert.h>
  584. /* Override any gcc2 internal prototype to avoid an error.  */
  585. char $ac_func(); 
  586.  
  587. int main() { return 0; }
  588. int t() {
  589.  
  590. /* The GNU C library defines this for functions which it implements
  591.     to always fail with ENOSYS.  Some functions are actually named
  592.     something starting with __ and the normal name is an alias.  */
  593. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  594. choke me
  595. #else
  596. $ac_func();
  597. #endif
  598.  
  599. ; return 0; }
  600. EOF
  601. if eval $ac_link; then
  602.   rm -rf conftest*
  603.   eval "ac_cv_func_$ac_func=yes"
  604. else
  605.   rm -rf conftest*
  606.   eval "ac_cv_func_$ac_func=no"
  607. fi
  608. rm -f conftest*
  609.  
  610. fi
  611. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  612.   echo "$ac_t""yes" 1>&6
  613.   :
  614. else
  615.   echo "$ac_t""no" 1>&6
  616. LIBOBJS="$LIBOBJS ${ac_func}.o"
  617. fi
  618.  
  619. done
  620.  
  621. for ac_func in strtol tmpnam waitpid
  622. do
  623. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  624. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  625.   echo $ac_n "(cached) $ac_c" 1>&6
  626. else
  627.   cat > conftest.$ac_ext <<EOF
  628. #line 629 "configure"
  629. #include "confdefs.h"
  630. /* System header to define __stub macros and hopefully few prototypes,
  631.     which can conflict with char $ac_func(); below.  */
  632. #include <assert.h>
  633. /* Override any gcc2 internal prototype to avoid an error.  */
  634. char $ac_func(); 
  635.  
  636. int main() { return 0; }
  637. int t() {
  638.  
  639. /* The GNU C library defines this for functions which it implements
  640.     to always fail with ENOSYS.  Some functions are actually named
  641.     something starting with __ and the normal name is an alias.  */
  642. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  643. choke me
  644. #else
  645. $ac_func();
  646. #endif
  647.  
  648. ; return 0; }
  649. EOF
  650. if eval $ac_link; then
  651.   rm -rf conftest*
  652.   eval "ac_cv_func_$ac_func=yes"
  653. else
  654.   rm -rf conftest*
  655.   eval "ac_cv_func_$ac_func=no"
  656. fi
  657. rm -f conftest*
  658.  
  659. fi
  660. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  661.   echo "$ac_t""yes" 1>&6
  662.   :
  663. else
  664.   echo "$ac_t""no" 1>&6
  665. LIBOBJS="$LIBOBJS ${ac_func}.o"
  666. fi
  667.  
  668. done
  669.  
  670. echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
  671. if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  672.   echo $ac_n "(cached) $ac_c" 1>&6
  673. else
  674.   cat > conftest.$ac_ext <<EOF
  675. #line 676 "configure"
  676. #include "confdefs.h"
  677. /* System header to define __stub macros and hopefully few prototypes,
  678.     which can conflict with char gettimeofday(); below.  */
  679. #include <assert.h>
  680. /* Override any gcc2 internal prototype to avoid an error.  */
  681. char gettimeofday(); 
  682.  
  683. int main() { return 0; }
  684. int t() {
  685.  
  686. /* The GNU C library defines this for functions which it implements
  687.     to always fail with ENOSYS.  Some functions are actually named
  688.     something starting with __ and the normal name is an alias.  */
  689. #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  690. choke me
  691. #else
  692. gettimeofday();
  693. #endif
  694.  
  695. ; return 0; }
  696. EOF
  697. if eval $ac_link; then
  698.   rm -rf conftest*
  699.   eval "ac_cv_func_gettimeofday=yes"
  700. else
  701.   rm -rf conftest*
  702.   eval "ac_cv_func_gettimeofday=no"
  703. fi
  704. rm -f conftest*
  705.  
  706. fi
  707. if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  708.   echo "$ac_t""yes" 1>&6
  709.   :
  710. else
  711.   echo "$ac_t""no" 1>&6
  712. cat >> confdefs.h <<\EOF
  713. #define NO_GETTOD 1
  714. EOF
  715.  
  716. fi
  717.  
  718. echo $ac_n "checking for getwd""... $ac_c" 1>&6
  719. if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
  720.   echo $ac_n "(cached) $ac_c" 1>&6
  721. else
  722.   cat > conftest.$ac_ext <<EOF
  723. #line 724 "configure"
  724. #include "confdefs.h"
  725. /* System header to define __stub macros and hopefully few prototypes,
  726.     which can conflict with char getwd(); below.  */
  727. #include <assert.h>
  728. /* Override any gcc2 internal prototype to avoid an error.  */
  729. char getwd(); 
  730.  
  731. int main() { return 0; }
  732. int t() {
  733.  
  734. /* The GNU C library defines this for functions which it implements
  735.     to always fail with ENOSYS.  Some functions are actually named
  736.     something starting with __ and the normal name is an alias.  */
  737. #if defined (__stub_getwd) || defined (__stub___getwd)
  738. choke me
  739. #else
  740. getwd();
  741. #endif
  742.  
  743. ; return 0; }
  744. EOF
  745. if eval $ac_link; then
  746.   rm -rf conftest*
  747.   eval "ac_cv_func_getwd=yes"
  748. else
  749.   rm -rf conftest*
  750.   eval "ac_cv_func_getwd=no"
  751. fi
  752. rm -f conftest*
  753.  
  754. fi
  755. if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then
  756.   echo "$ac_t""yes" 1>&6
  757.   :
  758. else
  759.   echo "$ac_t""no" 1>&6
  760. cat >> confdefs.h <<\EOF
  761. #define NO_GETWD 1
  762. EOF
  763.  
  764. fi
  765.  
  766. echo $ac_n "checking for wait3""... $ac_c" 1>&6
  767. if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
  768.   echo $ac_n "(cached) $ac_c" 1>&6
  769. else
  770.   cat > conftest.$ac_ext <<EOF
  771. #line 772 "configure"
  772. #include "confdefs.h"
  773. /* System header to define __stub macros and hopefully few prototypes,
  774.     which can conflict with char wait3(); below.  */
  775. #include <assert.h>
  776. /* Override any gcc2 internal prototype to avoid an error.  */
  777. char wait3(); 
  778.  
  779. int main() { return 0; }
  780. int t() {
  781.  
  782. /* The GNU C library defines this for functions which it implements
  783.     to always fail with ENOSYS.  Some functions are actually named
  784.     something starting with __ and the normal name is an alias.  */
  785. #if defined (__stub_wait3) || defined (__stub___wait3)
  786. choke me
  787. #else
  788. wait3();
  789. #endif
  790.  
  791. ; return 0; }
  792. EOF
  793. if eval $ac_link; then
  794.   rm -rf conftest*
  795.   eval "ac_cv_func_wait3=yes"
  796. else
  797.   rm -rf conftest*
  798.   eval "ac_cv_func_wait3=no"
  799. fi
  800. rm -f conftest*
  801.  
  802. fi
  803. if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
  804.   echo "$ac_t""yes" 1>&6
  805.   :
  806. else
  807.   echo "$ac_t""no" 1>&6
  808. cat >> confdefs.h <<\EOF
  809. #define NO_WAIT3 1
  810. EOF
  811.  
  812. fi
  813.  
  814.  
  815. #--------------------------------------------------------------------
  816. #    On a few very rare systems, all of the libm.a stuff is
  817. #    already in libc.a.  Set compiler flags accordingly.
  818. #    Also, Linux requires the "ieee" library for math to work
  819. #    right.
  820. #--------------------------------------------------------------------
  821.  
  822. echo $ac_n "checking for sin""... $ac_c" 1>&6
  823. if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
  824.   echo $ac_n "(cached) $ac_c" 1>&6
  825. else
  826.   cat > conftest.$ac_ext <<EOF
  827. #line 828 "configure"
  828. #include "confdefs.h"
  829. /* System header to define __stub macros and hopefully few prototypes,
  830.     which can conflict with char sin(); below.  */
  831. #include <assert.h>
  832. /* Override any gcc2 internal prototype to avoid an error.  */
  833. char sin(); 
  834.  
  835. int main() { return 0; }
  836. int t() {
  837.  
  838. /* The GNU C library defines this for functions which it implements
  839.     to always fail with ENOSYS.  Some functions are actually named
  840.     something starting with __ and the normal name is an alias.  */
  841. #if defined (__stub_sin) || defined (__stub___sin)
  842. choke me
  843. #else
  844. sin();
  845. #endif
  846.  
  847. ; return 0; }
  848. EOF
  849. if eval $ac_link; then
  850.   rm -rf conftest*
  851.   eval "ac_cv_func_sin=yes"
  852. else
  853.   rm -rf conftest*
  854.   eval "ac_cv_func_sin=no"
  855. fi
  856. rm -f conftest*
  857.  
  858. fi
  859. if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
  860.   echo "$ac_t""yes" 1>&6
  861.   MATH_LIBS=""
  862. else
  863.   echo "$ac_t""no" 1>&6
  864. MATH_LIBS="-lm"
  865. fi
  866.  
  867.  
  868. echo $ac_n "checking for -lieee""... $ac_c" 1>&6
  869. if eval "test \"`echo '$''{'ac_cv_lib_ieee'+set}'`\" = set"; then
  870.   echo $ac_n "(cached) $ac_c" 1>&6
  871. else
  872.   ac_save_LIBS="$LIBS"
  873. LIBS="-lieee  $LIBS"
  874. cat > conftest.$ac_ext <<EOF
  875. #line 876 "configure"
  876. #include "confdefs.h"
  877.  
  878. int main() { return 0; }
  879. int t() {
  880. main()
  881. ; return 0; }
  882. EOF
  883. if eval $ac_link; then
  884.   rm -rf conftest*
  885.   eval "ac_cv_lib_ieee=yes"
  886. else
  887.   rm -rf conftest*
  888.   eval "ac_cv_lib_ieee=no"
  889. fi
  890. rm -f conftest*
  891. LIBS="$ac_save_LIBS"
  892.  
  893. fi
  894. if eval "test \"`echo '$ac_cv_lib_'ieee`\" = yes"; then
  895.   echo "$ac_t""yes" 1>&6
  896.   MATH_LIBS="$MATH_LIBS -lieee"
  897. else
  898.   echo "$ac_t""no" 1>&6
  899. fi
  900.  
  901.  
  902. #--------------------------------------------------------------------
  903. #    Supply substitutes for missing POSIX header files.  Special
  904. #    notes:
  905. #        - Sprite's dirent.h exists but is bogus.
  906. #        - stdlib.h doesn't define strtol, strtoul, or
  907. #          strtod insome versions of SunOS
  908. #        - some versions of string.h don't declare procedures such
  909. #          as strstr
  910. #--------------------------------------------------------------------
  911.  
  912. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  913. # On Suns, sometimes $CPP names a directory.
  914. if test -n "$CPP" && test -d "$CPP"; then
  915.   CPP=
  916. fi
  917. if test -z "$CPP"; then
  918. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  919.   echo $ac_n "(cached) $ac_c" 1>&6
  920. else
  921.     # This must be in double quotes, not single quotes, because CPP may get
  922.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  923.   CPP="${CC-cc} -E"
  924.   # On the NeXT, cc -E runs the code through the compiler's parser,
  925.   # not just through cpp.
  926.   cat > conftest.$ac_ext <<EOF
  927. #line 928 "configure"
  928. #include "confdefs.h"
  929. #include <assert.h>
  930. Syntax Error
  931. EOF
  932. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  933. ac_err=`grep -v '^ *+' conftest.out`
  934. if test -z "$ac_err"; then
  935.   :
  936. else
  937.   echo "$ac_err" >&5
  938.   rm -rf conftest*
  939.   CPP="${CC-cc} -E -traditional-cpp"
  940.   cat > conftest.$ac_ext <<EOF
  941. #line 942 "configure"
  942. #include "confdefs.h"
  943. #include <assert.h>
  944. Syntax Error
  945. EOF
  946. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  947. ac_err=`grep -v '^ *+' conftest.out`
  948. if test -z "$ac_err"; then
  949.   :
  950. else
  951.   echo "$ac_err" >&5
  952.   rm -rf conftest*
  953.   CPP=/lib/cpp
  954. fi
  955. rm -f conftest*
  956. fi
  957. rm -f conftest*
  958.   ac_cv_prog_CPP="$CPP"
  959. fi
  960. fi
  961. CPP="$ac_cv_prog_CPP"
  962. echo "$ac_t""$CPP" 1>&6
  963.  
  964. for ac_hdr in unistd.h
  965. do
  966. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  967. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  968. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  969.   echo $ac_n "(cached) $ac_c" 1>&6
  970. else
  971.   cat > conftest.$ac_ext <<EOF
  972. #line 973 "configure"
  973. #include "confdefs.h"
  974. #include <$ac_hdr>
  975. EOF
  976. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  977. ac_err=`grep -v '^ *+' conftest.out`
  978. if test -z "$ac_err"; then
  979.   rm -rf conftest*
  980.   eval "ac_cv_header_$ac_safe=yes"
  981. else
  982.   echo "$ac_err" >&5
  983.   rm -rf conftest*
  984.   eval "ac_cv_header_$ac_safe=no"
  985. fi
  986. rm -f conftest*
  987. fi
  988. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  989.   echo "$ac_t""yes" 1>&6
  990.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  991.   cat >> confdefs.h <<EOF
  992. #define $ac_tr_hdr 1
  993. EOF
  994.  
  995. else
  996.   echo "$ac_t""no" 1>&6
  997. fi
  998. done
  999.  
  1000. echo $ac_n "checking dirent.h""... $ac_c" 1>&6
  1001. cat > conftest.$ac_ext <<EOF
  1002. #line 1003 "configure"
  1003. #include "confdefs.h"
  1004. #include <sys/types.h>
  1005. #include <dirent.h>
  1006. int main() { return 0; }
  1007. int t() {
  1008.  
  1009. #ifndef _POSIX_SOURCE
  1010. #   ifdef __Lynx__
  1011.     /*
  1012.      * Generate compilation error to make the test fail:  Lynx headers
  1013.      * are only valid if really in the POSIX environment.
  1014.      */
  1015.  
  1016.     missing_procedure();
  1017. #   endif
  1018. #endif
  1019. DIR *d;
  1020. struct dirent *entryPtr;
  1021. char *p;
  1022. d = opendir("foobar");
  1023. entryPtr = readdir(d);
  1024. p = entryPtr->d_name;
  1025. closedir(d);
  1026.  
  1027. ; return 0; }
  1028. EOF
  1029. if eval $ac_link; then
  1030.   rm -rf conftest*
  1031.   tcl_ok=yes
  1032. else
  1033.   rm -rf conftest*
  1034.   tcl_ok=no
  1035. fi
  1036. rm -f conftest*
  1037.  
  1038. cat > conftest.$ac_ext <<EOF
  1039. #line 1040 "configure"
  1040. #include "confdefs.h"
  1041. #include <tcl_ok=no>
  1042. EOF
  1043. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1044.   egrep "Sprite version.* NOT POSIX" >/dev/null 2>&1; then
  1045.   :
  1046. fi
  1047. rm -f conftest*
  1048.  
  1049. if test $tcl_ok = no; then
  1050.     cat >> confdefs.h <<\EOF
  1051. #define NO_DIRENT_H 1
  1052. EOF
  1053.  
  1054. fi
  1055. echo "$ac_t""$tcl_ok" 1>&6
  1056. ac_safe=`echo "errno.h" | tr './\055' '___'`
  1057. echo $ac_n "checking for errno.h""... $ac_c" 1>&6
  1058. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1059.   echo $ac_n "(cached) $ac_c" 1>&6
  1060. else
  1061.   cat > conftest.$ac_ext <<EOF
  1062. #line 1063 "configure"
  1063. #include "confdefs.h"
  1064. #include <errno.h>
  1065. EOF
  1066. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1067. ac_err=`grep -v '^ *+' conftest.out`
  1068. if test -z "$ac_err"; then
  1069.   rm -rf conftest*
  1070.   eval "ac_cv_header_$ac_safe=yes"
  1071. else
  1072.   echo "$ac_err" >&5
  1073.   rm -rf conftest*
  1074.   eval "ac_cv_header_$ac_safe=no"
  1075. fi
  1076. rm -f conftest*
  1077. fi
  1078. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1079.   echo "$ac_t""yes" 1>&6
  1080.   :
  1081. else
  1082.   echo "$ac_t""no" 1>&6
  1083. cat >> confdefs.h <<\EOF
  1084. #define NO_ERRNO_H 1
  1085. EOF
  1086.  
  1087. fi
  1088.  
  1089. ac_safe=`echo "float.h" | tr './\055' '___'`
  1090. echo $ac_n "checking for float.h""... $ac_c" 1>&6
  1091. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1092.   echo $ac_n "(cached) $ac_c" 1>&6
  1093. else
  1094.   cat > conftest.$ac_ext <<EOF
  1095. #line 1096 "configure"
  1096. #include "confdefs.h"
  1097. #include <float.h>
  1098. EOF
  1099. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1100. ac_err=`grep -v '^ *+' conftest.out`
  1101. if test -z "$ac_err"; then
  1102.   rm -rf conftest*
  1103.   eval "ac_cv_header_$ac_safe=yes"
  1104. else
  1105.   echo "$ac_err" >&5
  1106.   rm -rf conftest*
  1107.   eval "ac_cv_header_$ac_safe=no"
  1108. fi
  1109. rm -f conftest*
  1110. fi
  1111. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1112.   echo "$ac_t""yes" 1>&6
  1113.   :
  1114. else
  1115.   echo "$ac_t""no" 1>&6
  1116. cat >> confdefs.h <<\EOF
  1117. #define NO_FLOAT_H 1
  1118. EOF
  1119.  
  1120. fi
  1121.  
  1122. ac_safe=`echo "limits.h" | tr './\055' '___'`
  1123. echo $ac_n "checking for limits.h""... $ac_c" 1>&6
  1124. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1125.   echo $ac_n "(cached) $ac_c" 1>&6
  1126. else
  1127.   cat > conftest.$ac_ext <<EOF
  1128. #line 1129 "configure"
  1129. #include "confdefs.h"
  1130. #include <limits.h>
  1131. EOF
  1132. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1133. ac_err=`grep -v '^ *+' conftest.out`
  1134. if test -z "$ac_err"; then
  1135.   rm -rf conftest*
  1136.   eval "ac_cv_header_$ac_safe=yes"
  1137. else
  1138.   echo "$ac_err" >&5
  1139.   rm -rf conftest*
  1140.   eval "ac_cv_header_$ac_safe=no"
  1141. fi
  1142. rm -f conftest*
  1143. fi
  1144. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1145.   echo "$ac_t""yes" 1>&6
  1146.   :
  1147. else
  1148.   echo "$ac_t""no" 1>&6
  1149. cat >> confdefs.h <<\EOF
  1150. #define NO_LIMITS_H 1
  1151. EOF
  1152.  
  1153. fi
  1154.  
  1155. ac_safe=`echo "stdlib.h" | tr './\055' '___'`
  1156. echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
  1157. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1158.   echo $ac_n "(cached) $ac_c" 1>&6
  1159. else
  1160.   cat > conftest.$ac_ext <<EOF
  1161. #line 1162 "configure"
  1162. #include "confdefs.h"
  1163. #include <stdlib.h>
  1164. EOF
  1165. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1166. ac_err=`grep -v '^ *+' conftest.out`
  1167. if test -z "$ac_err"; then
  1168.   rm -rf conftest*
  1169.   eval "ac_cv_header_$ac_safe=yes"
  1170. else
  1171.   echo "$ac_err" >&5
  1172.   rm -rf conftest*
  1173.   eval "ac_cv_header_$ac_safe=no"
  1174. fi
  1175. rm -f conftest*
  1176. fi
  1177. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1178.   echo "$ac_t""yes" 1>&6
  1179.   tcl_ok=1
  1180. else
  1181.   echo "$ac_t""no" 1>&6
  1182. tcl_ok=0
  1183. fi
  1184.  
  1185. cat > conftest.$ac_ext <<EOF
  1186. #line 1187 "configure"
  1187. #include "confdefs.h"
  1188. #include <stdlib.h>
  1189. EOF
  1190. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1191.   egrep "strtol" >/dev/null 2>&1; then
  1192.   :
  1193. else
  1194.   rm -rf conftest*
  1195.   tcl_ok=0
  1196. fi
  1197. rm -f conftest*
  1198.  
  1199. cat > conftest.$ac_ext <<EOF
  1200. #line 1201 "configure"
  1201. #include "confdefs.h"
  1202. #include <stdlib.h>
  1203. EOF
  1204. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1205.   egrep "strtoul" >/dev/null 2>&1; then
  1206.   :
  1207. else
  1208.   rm -rf conftest*
  1209.   tcl_ok=0
  1210. fi
  1211. rm -f conftest*
  1212.  
  1213. cat > conftest.$ac_ext <<EOF
  1214. #line 1215 "configure"
  1215. #include "confdefs.h"
  1216. #include <stdlib.h>
  1217. EOF
  1218. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1219.   egrep "strtod" >/dev/null 2>&1; then
  1220.   :
  1221. else
  1222.   rm -rf conftest*
  1223.   tcl_ok=0
  1224. fi
  1225. rm -f conftest*
  1226.  
  1227. if test $tcl_ok = 0; then
  1228.     cat >> confdefs.h <<\EOF
  1229. #define NO_STDLIB_H 1
  1230. EOF
  1231.  
  1232. fi
  1233. ac_safe=`echo "string.h" | tr './\055' '___'`
  1234. echo $ac_n "checking for string.h""... $ac_c" 1>&6
  1235. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1236.   echo $ac_n "(cached) $ac_c" 1>&6
  1237. else
  1238.   cat > conftest.$ac_ext <<EOF
  1239. #line 1240 "configure"
  1240. #include "confdefs.h"
  1241. #include <string.h>
  1242. EOF
  1243. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1244. ac_err=`grep -v '^ *+' conftest.out`
  1245. if test -z "$ac_err"; then
  1246.   rm -rf conftest*
  1247.   eval "ac_cv_header_$ac_safe=yes"
  1248. else
  1249.   echo "$ac_err" >&5
  1250.   rm -rf conftest*
  1251.   eval "ac_cv_header_$ac_safe=no"
  1252. fi
  1253. rm -f conftest*
  1254. fi
  1255. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1256.   echo "$ac_t""yes" 1>&6
  1257.   tcl_ok=1
  1258. else
  1259.   echo "$ac_t""no" 1>&6
  1260. tcl_ok=0
  1261. fi
  1262.  
  1263. cat > conftest.$ac_ext <<EOF
  1264. #line 1265 "configure"
  1265. #include "confdefs.h"
  1266. #include <string.h>
  1267. EOF
  1268. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1269.   egrep "strstr" >/dev/null 2>&1; then
  1270.   :
  1271. else
  1272.   rm -rf conftest*
  1273.   tcl_ok=0
  1274. fi
  1275. rm -f conftest*
  1276.  
  1277. cat > conftest.$ac_ext <<EOF
  1278. #line 1279 "configure"
  1279. #include "confdefs.h"
  1280. #include <string.h>
  1281. EOF
  1282. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1283.   egrep "strerror" >/dev/null 2>&1; then
  1284.   :
  1285. else
  1286.   rm -rf conftest*
  1287.   tcl_ok=0
  1288. fi
  1289. rm -f conftest*
  1290.  
  1291. if test $tcl_ok = 0; then
  1292.     cat >> confdefs.h <<\EOF
  1293. #define NO_STRING_H 1
  1294. EOF
  1295.  
  1296. fi
  1297. ac_safe=`echo "sys/time.h" | tr './\055' '___'`
  1298. echo $ac_n "checking for sys/time.h""... $ac_c" 1>&6
  1299. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1300.   echo $ac_n "(cached) $ac_c" 1>&6
  1301. else
  1302.   cat > conftest.$ac_ext <<EOF
  1303. #line 1304 "configure"
  1304. #include "confdefs.h"
  1305. #include <sys/time.h>
  1306. EOF
  1307. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1308. ac_err=`grep -v '^ *+' conftest.out`
  1309. if test -z "$ac_err"; then
  1310.   rm -rf conftest*
  1311.   eval "ac_cv_header_$ac_safe=yes"
  1312. else
  1313.   echo "$ac_err" >&5
  1314.   rm -rf conftest*
  1315.   eval "ac_cv_header_$ac_safe=no"
  1316. fi
  1317. rm -f conftest*
  1318. fi
  1319. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1320.   echo "$ac_t""yes" 1>&6
  1321.   :
  1322. else
  1323.   echo "$ac_t""no" 1>&6
  1324. cat >> confdefs.h <<\EOF
  1325. #define NO_SYS_TIME_H 1
  1326. EOF
  1327.  
  1328. fi
  1329.  
  1330. ac_safe=`echo "sys/wait.h" | tr './\055' '___'`
  1331. echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
  1332. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1333.   echo $ac_n "(cached) $ac_c" 1>&6
  1334. else
  1335.   cat > conftest.$ac_ext <<EOF
  1336. #line 1337 "configure"
  1337. #include "confdefs.h"
  1338. #include <sys/wait.h>
  1339. EOF
  1340. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1341. ac_err=`grep -v '^ *+' conftest.out`
  1342. if test -z "$ac_err"; then
  1343.   rm -rf conftest*
  1344.   eval "ac_cv_header_$ac_safe=yes"
  1345. else
  1346.   echo "$ac_err" >&5
  1347.   rm -rf conftest*
  1348.   eval "ac_cv_header_$ac_safe=no"
  1349. fi
  1350. rm -f conftest*
  1351. fi
  1352. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1353.   echo "$ac_t""yes" 1>&6
  1354.   :
  1355. else
  1356.   echo "$ac_t""no" 1>&6
  1357. cat >> confdefs.h <<\EOF
  1358. #define NO_SYS_WAIT_H 1
  1359. EOF
  1360.  
  1361. fi
  1362.  
  1363.  
  1364. #--------------------------------------------------------------------
  1365. #    On some systems strstr is broken: it returns a pointer even
  1366. #    even if the original string is empty.
  1367. #--------------------------------------------------------------------
  1368.  
  1369. echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
  1370. if test "$cross_compiling" = yes; then
  1371.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1372. else
  1373. cat > conftest.$ac_ext <<EOF
  1374. #line 1375 "configure"
  1375. #include "confdefs.h"
  1376.  
  1377. extern int strstr();
  1378. int main()
  1379. {
  1380.     exit(strstr("\0test", "test") ? 1 : 0);
  1381. }
  1382.  
  1383. EOF
  1384. eval $ac_link
  1385. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1386.   tck_ok=yes
  1387. else
  1388.   tcl_ok=no
  1389. fi
  1390. fi
  1391. rm -fr conftest*
  1392. if test $tcl_ok = yes; then
  1393.     echo "$ac_t""yes" 1>&6
  1394. else
  1395.     echo "$ac_t""broken, using substitute" 1>&6
  1396.     LIBOBJS="$LIBOBJS strstr.o"
  1397. fi
  1398.  
  1399. #--------------------------------------------------------------------
  1400. #    Check for strtoul function.  This is tricky because under some
  1401. #    versions of AIX strtoul returns an incorrect terminator
  1402. #    pointer for the string "0".
  1403. #--------------------------------------------------------------------
  1404.  
  1405. echo $ac_n "checking for strtoul""... $ac_c" 1>&6
  1406. if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
  1407.   echo $ac_n "(cached) $ac_c" 1>&6
  1408. else
  1409.   cat > conftest.$ac_ext <<EOF
  1410. #line 1411 "configure"
  1411. #include "confdefs.h"
  1412. /* System header to define __stub macros and hopefully few prototypes,
  1413.     which can conflict with char strtoul(); below.  */
  1414. #include <assert.h>
  1415. /* Override any gcc2 internal prototype to avoid an error.  */
  1416. char strtoul(); 
  1417.  
  1418. int main() { return 0; }
  1419. int t() {
  1420.  
  1421. /* The GNU C library defines this for functions which it implements
  1422.     to always fail with ENOSYS.  Some functions are actually named
  1423.     something starting with __ and the normal name is an alias.  */
  1424. #if defined (__stub_strtoul) || defined (__stub___strtoul)
  1425. choke me
  1426. #else
  1427. strtoul();
  1428. #endif
  1429.  
  1430. ; return 0; }
  1431. EOF
  1432. if eval $ac_link; then
  1433.   rm -rf conftest*
  1434.   eval "ac_cv_func_strtoul=yes"
  1435. else
  1436.   rm -rf conftest*
  1437.   eval "ac_cv_func_strtoul=no"
  1438. fi
  1439. rm -f conftest*
  1440.  
  1441. fi
  1442. if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
  1443.   echo "$ac_t""yes" 1>&6
  1444.   tcl_ok=1
  1445. else
  1446.   echo "$ac_t""no" 1>&6
  1447. tcl_ok=0
  1448. fi
  1449.  
  1450. if test "$cross_compiling" = yes; then
  1451.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1452. else
  1453. cat > conftest.$ac_ext <<EOF
  1454. #line 1455 "configure"
  1455. #include "confdefs.h"
  1456.  
  1457. extern int strtoul();
  1458. int main()
  1459. {
  1460.     char *string = "0";
  1461.     char *term;
  1462.     int value;
  1463.     value = strtoul(string, &term, 0);
  1464.     if ((value != 0) || (term != (string+1))) {
  1465.         exit(1);
  1466.     }
  1467.     exit(0);
  1468. }
  1469. EOF
  1470. eval $ac_link
  1471. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1472.   :
  1473. else
  1474.   tcl_ok=0
  1475. fi
  1476. fi
  1477. rm -fr conftest*
  1478. if test $tcl_ok = 0; then
  1479.     test -n "$verbose" && echo "    Adding strtoul.o."
  1480.     LIBOBJS="$LIBOBJS strtoul.o"
  1481. fi
  1482.  
  1483. #--------------------------------------------------------------------
  1484. #    Check for the strtod function.  This is tricky because in some
  1485. #    versions of Linux strtod mis-parses strings starting with "+".
  1486. #--------------------------------------------------------------------
  1487.  
  1488. echo $ac_n "checking for strtod""... $ac_c" 1>&6
  1489. if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  1490.   echo $ac_n "(cached) $ac_c" 1>&6
  1491. else
  1492.   cat > conftest.$ac_ext <<EOF
  1493. #line 1494 "configure"
  1494. #include "confdefs.h"
  1495. /* System header to define __stub macros and hopefully few prototypes,
  1496.     which can conflict with char strtod(); below.  */
  1497. #include <assert.h>
  1498. /* Override any gcc2 internal prototype to avoid an error.  */
  1499. char strtod(); 
  1500.  
  1501. int main() { return 0; }
  1502. int t() {
  1503.  
  1504. /* The GNU C library defines this for functions which it implements
  1505.     to always fail with ENOSYS.  Some functions are actually named
  1506.     something starting with __ and the normal name is an alias.  */
  1507. #if defined (__stub_strtod) || defined (__stub___strtod)
  1508. choke me
  1509. #else
  1510. strtod();
  1511. #endif
  1512.  
  1513. ; return 0; }
  1514. EOF
  1515. if eval $ac_link; then
  1516.   rm -rf conftest*
  1517.   eval "ac_cv_func_strtod=yes"
  1518. else
  1519.   rm -rf conftest*
  1520.   eval "ac_cv_func_strtod=no"
  1521. fi
  1522. rm -f conftest*
  1523.  
  1524. fi
  1525. if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  1526.   echo "$ac_t""yes" 1>&6
  1527.   tcl_ok=1
  1528. else
  1529.   echo "$ac_t""no" 1>&6
  1530. tcl_ok=0
  1531. fi
  1532.  
  1533. if test "$cross_compiling" = yes; then
  1534.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1535. else
  1536. cat > conftest.$ac_ext <<EOF
  1537. #line 1538 "configure"
  1538. #include "confdefs.h"
  1539.  
  1540. extern double strtod();
  1541. int main()
  1542. {
  1543.     char *string = " +69";
  1544.     char *term;
  1545.     double value;
  1546.     value = strtod(string, &term);
  1547.     if ((value != 69) || (term != (string+4))) {
  1548.     exit(1);
  1549.     }
  1550.     exit(0);
  1551. }
  1552. EOF
  1553. eval $ac_link
  1554. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1555.   :
  1556. else
  1557.   tcl_ok=0
  1558. fi
  1559. fi
  1560. rm -fr conftest*
  1561. if test $tcl_ok = 0; then
  1562.     test -n "$verbose" && echo "    Adding strtod.o."
  1563.     LIBOBJS="$LIBOBJS strtod.o"
  1564. fi
  1565.  
  1566. #--------------------------------------------------------------------
  1567. #    Check for various typedefs and provide substitutes if
  1568. #    they don't exist.
  1569. #--------------------------------------------------------------------
  1570.  
  1571. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1572. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1573.   echo $ac_n "(cached) $ac_c" 1>&6
  1574. else
  1575.   cat > conftest.$ac_ext <<EOF
  1576. #line 1577 "configure"
  1577. #include "confdefs.h"
  1578. #include <stdlib.h>
  1579. #include <stdarg.h>
  1580. #include <string.h>
  1581. #include <float.h>
  1582. EOF
  1583. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1584. ac_err=`grep -v '^ *+' conftest.out`
  1585. if test -z "$ac_err"; then
  1586.   rm -rf conftest*
  1587.   ac_cv_header_stdc=yes
  1588. else
  1589.   echo "$ac_err" >&5
  1590.   rm -rf conftest*
  1591.   ac_cv_header_stdc=no
  1592. fi
  1593. rm -f conftest*
  1594.  
  1595. if test $ac_cv_header_stdc = yes; then
  1596.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1597. cat > conftest.$ac_ext <<EOF
  1598. #line 1599 "configure"
  1599. #include "confdefs.h"
  1600. #include <string.h>
  1601. EOF
  1602. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1603.   egrep "memchr" >/dev/null 2>&1; then
  1604.   :
  1605. else
  1606.   rm -rf conftest*
  1607.   ac_cv_header_stdc=no
  1608. fi
  1609. rm -f conftest*
  1610.  
  1611. fi
  1612.  
  1613. if test $ac_cv_header_stdc = yes; then
  1614.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1615. cat > conftest.$ac_ext <<EOF
  1616. #line 1617 "configure"
  1617. #include "confdefs.h"
  1618. #include <stdlib.h>
  1619. EOF
  1620. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1621.   egrep "free" >/dev/null 2>&1; then
  1622.   :
  1623. else
  1624.   rm -rf conftest*
  1625.   ac_cv_header_stdc=no
  1626. fi
  1627. rm -f conftest*
  1628.  
  1629. fi
  1630.  
  1631. if test $ac_cv_header_stdc = yes; then
  1632.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1633. if test "$cross_compiling" = yes; then
  1634.   ac_cv_header_stdc=no
  1635. else
  1636. cat > conftest.$ac_ext <<EOF
  1637. #line 1638 "configure"
  1638. #include "confdefs.h"
  1639. #include <ctype.h>
  1640. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1641. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1642. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1643. int main () { int i; for (i = 0; i < 256; i++)
  1644. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1645. exit (0); }
  1646.  
  1647. EOF
  1648. eval $ac_link
  1649. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1650.   :
  1651. else
  1652.   ac_cv_header_stdc=no
  1653. fi
  1654. fi
  1655. rm -fr conftest*
  1656. fi
  1657. fi
  1658. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1659. if test $ac_cv_header_stdc = yes; then
  1660.   cat >> confdefs.h <<\EOF
  1661. #define STDC_HEADERS 1
  1662. EOF
  1663.  
  1664. fi
  1665.  
  1666. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1667. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1668.   echo $ac_n "(cached) $ac_c" 1>&6
  1669. else
  1670.   cat > conftest.$ac_ext <<EOF
  1671. #line 1672 "configure"
  1672. #include "confdefs.h"
  1673. #include <sys/types.h>
  1674. #if STDC_HEADERS
  1675. #include <stdlib.h>
  1676. #endif
  1677. EOF
  1678. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1679.   egrep "mode_t" >/dev/null 2>&1; then
  1680.   rm -rf conftest*
  1681.   ac_cv_type_mode_t=yes
  1682. else
  1683.   rm -rf conftest*
  1684.   ac_cv_type_mode_t=no
  1685. fi
  1686. rm -f conftest*
  1687.  
  1688. fi
  1689. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  1690. if test $ac_cv_type_mode_t = no; then
  1691.   cat >> confdefs.h <<\EOF
  1692. #define mode_t int
  1693. EOF
  1694.  
  1695. fi
  1696.  
  1697. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1698. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1699.   echo $ac_n "(cached) $ac_c" 1>&6
  1700. else
  1701.   cat > conftest.$ac_ext <<EOF
  1702. #line 1703 "configure"
  1703. #include "confdefs.h"
  1704. #include <sys/types.h>
  1705. #if STDC_HEADERS
  1706. #include <stdlib.h>
  1707. #endif
  1708. EOF
  1709. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1710.   egrep "pid_t" >/dev/null 2>&1; then
  1711.   rm -rf conftest*
  1712.   ac_cv_type_pid_t=yes
  1713. else
  1714.   rm -rf conftest*
  1715.   ac_cv_type_pid_t=no
  1716. fi
  1717. rm -f conftest*
  1718.  
  1719. fi
  1720. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1721. if test $ac_cv_type_pid_t = no; then
  1722.   cat >> confdefs.h <<\EOF
  1723. #define pid_t int
  1724. EOF
  1725.  
  1726. fi
  1727.  
  1728. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1729. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1730.   echo $ac_n "(cached) $ac_c" 1>&6
  1731. else
  1732.   cat > conftest.$ac_ext <<EOF
  1733. #line 1734 "configure"
  1734. #include "confdefs.h"
  1735. #include <sys/types.h>
  1736. #if STDC_HEADERS
  1737. #include <stdlib.h>
  1738. #endif
  1739. EOF
  1740. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1741.   egrep "size_t" >/dev/null 2>&1; then
  1742.   rm -rf conftest*
  1743.   ac_cv_type_size_t=yes
  1744. else
  1745.   rm -rf conftest*
  1746.   ac_cv_type_size_t=no
  1747. fi
  1748. rm -f conftest*
  1749.  
  1750. fi
  1751. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1752. if test $ac_cv_type_size_t = no; then
  1753.   cat >> confdefs.h <<\EOF
  1754. #define size_t unsigned
  1755. EOF
  1756.  
  1757. fi
  1758.  
  1759. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1760. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1761.   echo $ac_n "(cached) $ac_c" 1>&6
  1762. else
  1763.   cat > conftest.$ac_ext <<EOF
  1764. #line 1765 "configure"
  1765. #include "confdefs.h"
  1766. #include <sys/types.h>
  1767. EOF
  1768. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1769.   egrep "uid_t" >/dev/null 2>&1; then
  1770.   rm -rf conftest*
  1771.   ac_cv_type_uid_t=yes
  1772. else
  1773.   rm -rf conftest*
  1774.   ac_cv_type_uid_t=no
  1775. fi
  1776. rm -f conftest*
  1777.  
  1778. fi
  1779. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1780. if test $ac_cv_type_uid_t = no; then
  1781.   cat >> confdefs.h <<\EOF
  1782. #define uid_t int
  1783. EOF
  1784.  
  1785.   cat >> confdefs.h <<\EOF
  1786. #define gid_t int
  1787. EOF
  1788.  
  1789. fi
  1790.  
  1791.  
  1792. #--------------------------------------------------------------------
  1793. #    If a system doesn't have an opendir function (man, that's old!)
  1794. #    then we have to supply a different version of dirent.h which
  1795. #    is compatible with the substitute version of opendir that's
  1796. #    provided.  This version only works with V7-style directories.
  1797. #--------------------------------------------------------------------
  1798.  
  1799. echo $ac_n "checking for opendir""... $ac_c" 1>&6
  1800. if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
  1801.   echo $ac_n "(cached) $ac_c" 1>&6
  1802. else
  1803.   cat > conftest.$ac_ext <<EOF
  1804. #line 1805 "configure"
  1805. #include "confdefs.h"
  1806. /* System header to define __stub macros and hopefully few prototypes,
  1807.     which can conflict with char opendir(); below.  */
  1808. #include <assert.h>
  1809. /* Override any gcc2 internal prototype to avoid an error.  */
  1810. char opendir(); 
  1811.  
  1812. int main() { return 0; }
  1813. int t() {
  1814.  
  1815. /* The GNU C library defines this for functions which it implements
  1816.     to always fail with ENOSYS.  Some functions are actually named
  1817.     something starting with __ and the normal name is an alias.  */
  1818. #if defined (__stub_opendir) || defined (__stub___opendir)
  1819. choke me
  1820. #else
  1821. opendir();
  1822. #endif
  1823.  
  1824. ; return 0; }
  1825. EOF
  1826. if eval $ac_link; then
  1827.   rm -rf conftest*
  1828.   eval "ac_cv_func_opendir=yes"
  1829. else
  1830.   rm -rf conftest*
  1831.   eval "ac_cv_func_opendir=no"
  1832. fi
  1833. rm -f conftest*
  1834.  
  1835. fi
  1836. if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then
  1837.   echo "$ac_t""yes" 1>&6
  1838.   :
  1839. else
  1840.   echo "$ac_t""no" 1>&6
  1841. cat >> confdefs.h <<\EOF
  1842. #define USE_DIRENT2_H 1
  1843. EOF
  1844.  
  1845. fi
  1846.  
  1847.  
  1848. #--------------------------------------------------------------------
  1849. #    Check for the existence of sys_errlist (this is only needed if
  1850. #    there's no strerror, but I don't know how to conditionalize the
  1851. #    check).
  1852. #--------------------------------------------------------------------
  1853.  
  1854. echo $ac_n "checking sys_errlist""... $ac_c" 1>&6
  1855. cat > conftest.$ac_ext <<EOF
  1856. #line 1857 "configure"
  1857. #include "confdefs.h"
  1858.  
  1859. int main() { return 0; }
  1860. int t() {
  1861.  
  1862. extern char *sys_errlist[];
  1863. extern int sys_nerr;
  1864. sys_errlist[sys_nerr-1][0] = 0;
  1865.  
  1866. ; return 0; }
  1867. EOF
  1868. if eval $ac_link; then
  1869.   rm -rf conftest*
  1870.   tcl_ok=yes
  1871. else
  1872.   rm -rf conftest*
  1873.   tcl_ok=no
  1874. fi
  1875. rm -f conftest*
  1876.  
  1877. echo "$ac_t""$tcl_ok" 1>&6
  1878. if test $tcl_ok = no; then
  1879.     cat >> confdefs.h <<\EOF
  1880. #define NO_SYS_ERRLIST 1
  1881. EOF
  1882.  
  1883. fi
  1884.  
  1885. #--------------------------------------------------------------------
  1886. #    The check below checks whether <sys/wait.h> defines the type
  1887. #    "union wait" correctly.  It's needed because of weirdness in
  1888. #    HP-UX where "union wait" is defined in both the BSD and SYS-V
  1889. #    environments.  Checking the usability of WIFEXITED seems to do
  1890. #    the trick.
  1891. #--------------------------------------------------------------------
  1892.  
  1893. echo $ac_n "checking union wait""... $ac_c" 1>&6
  1894. cat > conftest.$ac_ext <<EOF
  1895. #line 1896 "configure"
  1896. #include "confdefs.h"
  1897. #include <sys/types.h> 
  1898. #include <sys/wait.h>
  1899. int main() { return 0; }
  1900. int t() {
  1901.  
  1902. union wait x;
  1903. WIFEXITED(x);        /* Generates compiler error if WIFEXITED
  1904.              * uses an int. */
  1905.  
  1906. ; return 0; }
  1907. EOF
  1908. if eval $ac_link; then
  1909.   rm -rf conftest*
  1910.   tcl_ok=yes
  1911. else
  1912.   rm -rf conftest*
  1913.   tcl_ok=no
  1914. fi
  1915. rm -f conftest*
  1916.  
  1917. echo "$ac_t""$tcl_ok" 1>&6
  1918. if test $tcl_ok = no; then
  1919.     cat >> confdefs.h <<\EOF
  1920. #define NO_UNION_WAIT 1
  1921. EOF
  1922.  
  1923. fi
  1924.  
  1925. #--------------------------------------------------------------------
  1926. #    Check to see whether the system supports the matherr function
  1927. #    and its associated type "struct exception".
  1928. #--------------------------------------------------------------------
  1929.  
  1930. echo $ac_n "checking matherr support""... $ac_c" 1>&6
  1931. cat > conftest.$ac_ext <<EOF
  1932. #line 1933 "configure"
  1933. #include "confdefs.h"
  1934. #include <math.h>
  1935. int main() { return 0; }
  1936. int t() {
  1937.  
  1938. struct exception x;
  1939. x.type = DOMAIN;
  1940. x.type = SING;
  1941.  
  1942. ; return 0; }
  1943. EOF
  1944. if eval $ac_compile; then
  1945.   rm -rf conftest*
  1946.   tcl_ok=yes
  1947. else
  1948.   rm -rf conftest*
  1949.   tcl_ok=no
  1950. fi
  1951. rm -f conftest*
  1952.  
  1953. echo "$ac_t""$tcl_ok" 1>&6
  1954. if test $tcl_ok = yes; then
  1955.     cat >> confdefs.h <<\EOF
  1956. #define NEED_MATHERR 1
  1957. EOF
  1958.  
  1959. fi
  1960.  
  1961. #--------------------------------------------------------------------
  1962. #    Check to see whether the system provides a vfork kernel call.
  1963. #    If not, then use fork instead.
  1964. #--------------------------------------------------------------------
  1965.  
  1966. echo $ac_n "checking for vfork""... $ac_c" 1>&6
  1967. if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
  1968.   echo $ac_n "(cached) $ac_c" 1>&6
  1969. else
  1970.   cat > conftest.$ac_ext <<EOF
  1971. #line 1972 "configure"
  1972. #include "confdefs.h"
  1973. /* System header to define __stub macros and hopefully few prototypes,
  1974.     which can conflict with char vfork(); below.  */
  1975. #include <assert.h>
  1976. /* Override any gcc2 internal prototype to avoid an error.  */
  1977. char vfork(); 
  1978.  
  1979. int main() { return 0; }
  1980. int t() {
  1981.  
  1982. /* The GNU C library defines this for functions which it implements
  1983.     to always fail with ENOSYS.  Some functions are actually named
  1984.     something starting with __ and the normal name is an alias.  */
  1985. #if defined (__stub_vfork) || defined (__stub___vfork)
  1986. choke me
  1987. #else
  1988. vfork();
  1989. #endif
  1990.  
  1991. ; return 0; }
  1992. EOF
  1993. if eval $ac_link; then
  1994.   rm -rf conftest*
  1995.   eval "ac_cv_func_vfork=yes"
  1996. else
  1997.   rm -rf conftest*
  1998.   eval "ac_cv_func_vfork=no"
  1999. fi
  2000. rm -f conftest*
  2001.  
  2002. fi
  2003. if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
  2004.   echo "$ac_t""yes" 1>&6
  2005.   :
  2006. else
  2007.   echo "$ac_t""no" 1>&6
  2008. cat >> confdefs.h <<\EOF
  2009. #define vfork fork
  2010. EOF
  2011.  
  2012. fi
  2013.  
  2014.  
  2015. trap '' 1 2 15
  2016. cat > confcache <<\EOF
  2017. # This file is a shell script that caches the results of configure
  2018. # tests run on this system so they can be shared between configure
  2019. # scripts and configure runs.  It is not useful on other systems.
  2020. # If it contains results you don't want to keep, you may remove or edit it.
  2021. #
  2022. # By default, configure uses ./config.cache as the cache file,
  2023. # creating it if it does not exist already.  You can give configure
  2024. # the --cache-file=FILE option to use a different cache file; that is
  2025. # what configure does when it calls configure scripts in
  2026. # subdirectories, so they share the cache.
  2027. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2028. # config.status only pays attention to the cache file if you give it the
  2029. # --recheck option to rerun configure.
  2030. #
  2031. EOF
  2032. # Ultrix sh set writes to stderr and can't be redirected directly,
  2033. # and sets the high bit in the cache file unless we assign to the vars.
  2034. (set) 2>&1 |
  2035.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  2036.   >> confcache
  2037. if cmp -s $cache_file confcache; then
  2038.   :
  2039. else
  2040.   if test -w $cache_file; then
  2041.     echo "updating cache $cache_file"
  2042.     cat confcache > $cache_file
  2043.   else
  2044.     echo "not updating unwritable cache $cache_file"
  2045.   fi
  2046. fi
  2047. rm -f confcache
  2048.  
  2049. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2050.  
  2051. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2052. # Let make expand exec_prefix.
  2053. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2054.  
  2055. # Any assignment to VPATH causes Sun make to only execute
  2056. # the first set of double-colon rules, so remove it if not needed.
  2057. # If there is a colon in the path, we need to keep it.
  2058. if test "x$srcdir" = x.; then
  2059.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2060. fi
  2061.  
  2062. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2063.  
  2064. # Transform confdefs.h into DEFS.
  2065. # Protect against shell expansion while executing Makefile rules.
  2066. # Protect against Makefile macro expansion.
  2067. cat > conftest.defs <<\EOF
  2068. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
  2069. s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  2070. s%\[%\\&%g
  2071. s%\]%\\&%g
  2072. s%\$%$$%g
  2073. EOF
  2074. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  2075. rm -f conftest.defs
  2076.  
  2077.  
  2078. # Without the "./", some shells look in PATH for config.status.
  2079. : ${CONFIG_STATUS=./config.status}
  2080.  
  2081. echo creating $CONFIG_STATUS
  2082. rm -f $CONFIG_STATUS
  2083. cat > $CONFIG_STATUS <<EOF
  2084. #! /bin/sh
  2085. # Generated automatically by configure.
  2086. # Run this file to recreate the current configuration.
  2087. # This directory was configured as follows,
  2088. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2089. #
  2090. # $0 $ac_configure_args
  2091. #
  2092. # Compiler output produced by configure, useful for debugging
  2093. # configure, is in ./config.log if it exists.
  2094.  
  2095. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2096. for ac_option
  2097. do
  2098.   case "\$ac_option" in
  2099.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2100.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2101.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2102.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2103.     echo "$CONFIG_STATUS generated by autoconf version 2.2"
  2104.     exit 0 ;;
  2105.   -help | --help | --hel | --he | --h)
  2106.     echo "\$ac_cs_usage"; exit 0 ;;
  2107.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2108.   esac
  2109. done
  2110.  
  2111. ac_given_srcdir=$srcdir
  2112. ac_given_INSTALL="$INSTALL"
  2113.  
  2114. trap 'rm -f Makefile; exit 1' 1 2 15
  2115.  
  2116. # Protect against being on the right side of a sed subst in config.status. 
  2117. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  2118.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  2119. $ac_vpsub
  2120. $extrasub
  2121. s%@CFLAGS@%$CFLAGS%g
  2122. s%@CPPFLAGS@%$CPPFLAGS%g
  2123. s%@CXXFLAGS@%$CXXFLAGS%g
  2124. s%@DEFS@%$DEFS%g
  2125. s%@LDFLAGS@%$LDFLAGS%g
  2126. s%@LIBS@%$LIBS%g
  2127. s%@exec_prefix@%$exec_prefix%g
  2128. s%@prefix@%$prefix%g
  2129. s%@program_transform_name@%$program_transform_name%g
  2130. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2131. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2132. s%@RANLIB@%$RANLIB%g
  2133. s%@TCLSH@%$TCLSH%g
  2134. s%@CC@%$CC%g
  2135. s%@LIBOBJS@%$LIBOBJS%g
  2136. s%@MATH_LIBS@%$MATH_LIBS%g
  2137. s%@CPP@%$CPP%g
  2138.  
  2139. CEOF
  2140. EOF
  2141. cat >> $CONFIG_STATUS <<EOF
  2142.  
  2143. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  2144. EOF
  2145. cat >> $CONFIG_STATUS <<\EOF
  2146. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2147.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2148.   case "$ac_file" in
  2149.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2150.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2151.   *) ac_file_in="${ac_file}.in" ;;
  2152.   esac
  2153.  
  2154.   # Adjust relative srcdir, etc. for subdirectories.
  2155.  
  2156.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2157.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2158.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2159.     # The file is in a subdirectory.
  2160.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2161.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2162.     # A "../" for each directory in $ac_dir_suffix.
  2163.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2164.   else
  2165.     ac_dir_suffix= ac_dots=
  2166.   fi
  2167.  
  2168.   case "$ac_given_srcdir" in
  2169.   .)  srcdir=.
  2170.       if test -z "$ac_dots"; then top_srcdir=.
  2171.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2172.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2173.   *) # Relative path.
  2174.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2175.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2176.   esac
  2177.  
  2178.   case "$ac_given_INSTALL" in
  2179.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2180.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2181.   esac
  2182.   echo creating "$ac_file"
  2183.   rm -f "$ac_file"
  2184.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2185.   case "$ac_file" in
  2186.   *Makefile*) ac_comsub="1i\\
  2187. # $configure_input" ;;
  2188.   *) ac_comsub= ;;
  2189.   esac
  2190.   sed -e "$ac_comsub
  2191. s%@configure_input@%$configure_input%g
  2192. s%@srcdir@%$srcdir%g
  2193. s%@top_srcdir@%$top_srcdir%g
  2194. s%@INSTALL@%$INSTALL%g
  2195. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2196. fi; done
  2197. rm -f conftest.subs
  2198.  
  2199.  
  2200.  
  2201. exit 0
  2202. EOF
  2203. chmod +x $CONFIG_STATUS
  2204. rm -fr confdefs* $ac_clean_files
  2205. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2206.  
  2207.